package com.pucong.gitee.database.backup.common.entity.sys;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author zhangfaming
 * @company www.hchl.org
 * @create 2021/9/23
 */
@Data
@ApiModel("大文件分片入参实体 dto")
public class BigFileUploadParamDto  implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("文件md5")
    @NotBlank(message = "请上传MD5计算后的唯一值")
    private String fileMd5;

    @ApiModelProperty(value = "当前为第几分片",example = "0")
    @NotNull(message = "当前为第几分片 不能为空，从0开始")
    private int chunk;

    @ApiModelProperty(value = "每个分块的大小",example = "0")
    @NotNull(message = "每个分块的大小 不能为空")
    private long size;

    @ApiModelProperty(value = "分片总数",example = "0")
    @NotNull(message = "分片总数 不能为空")
    private int chunkTotal;

    @ApiModelProperty("文件大小")
    private String fileSize;

    @ApiModelProperty("文件名称")
    private String fileName;

    @ApiModelProperty("业务表id")
    private String businessId;
}
